#!/bin/bash
sourceurl="deb https://apt.dockerproject.org/repo ubuntu-trusty main"
sudo echo $sourceurl > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r)
#apt-get install apparmor
sudo apt-get install --force-yes -y  docker-engine
#sudo service docker start



sudo wget https://github.com/docker/compose/releases/download/1.6.2/docker-compose-$(uname -s)-$(uname -m) -c -O /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

#sudo docker-compose -f /vagrant/cassandra_kong.yaml up -d
#sudo docker-compose -f /vagrant/php_nginx.yaml up -d
sudo docker-compose -f /vagrant/apiman.yaml up -d
#sudo docker-compose -f /vagrant/redis_tyk_gateway.yaml up -d
#sudo docker create -v /vagrant/webroot/:/usr/share/nginx/html/:ro --name webroot busybox
#sudo docker run -d --volumes-from webroot --name phpfpm php:7-fpm 
#sudo docker run -d --volumes-from webroot -v /vagrant/log/:/var/log/ \
# -v /vagrant/config/nginx.conf.d/:/etc/nginx/conf.d/:ro -p 80:80 \
# --name nginx --link phpfpm:phpfpm nginx:stable
 
 
 
 
 
#sudo docker create -v /vagrant/webroot/:/usr/share/nginx/html/:ro --name webroot busybox
#sudo docker run -d --name php-fpm -v /vagrant/webroot/:/usr/share/nginx/html/  php:7-fpm

#sudo docker run -d  -v /vagrant/webroot/:/usr/share/nginx/html/:ro \
#-v /vagrant/nginx.conf.d/:/etc/nginx/conf.d/:ro \
# --name nginx --link php-fpm:php-fpm nginx:stable


#sudo docker run -d  --volumes-from php-fpm \
# -v /vagrant/nginx.conf.d/:/etc/nginx/conf.d/:ro \
# --name nginx --link php-fpm:php-fpm nginx:stable
 